import crypto from 'crypto'
//  return {userid:'12345',sign:this.sign}
export default {
    md(data){
        let md5=crypto.createHash("md5")
        let zi=''
        for (let [key,value] of Object.entries(data)){
            zi+=key+value
        }
        md5.update(zi+'key'+'PKwUJyO1GGraH7mDhClqWHExSPgGgcq')  
        let sha256 =require('js-sha256').sha256
        return {...data,sign:sha256(md5.digest('hex'))}
    }
}